{include file="public/_meta" /}
<body>
<style>
    .required_b{
        color: red;
    }
    .table td, .table th {
        font-size: 14px;
        border-top-width: 0;
        border-bottom: 1px solid;
        border-color: #ebedf2 !important;
        padding: 0 25px !important;
        height: 45px;
        vertical-align: middle !important;
    }
</style>
<div class="wrapper">

    {include file="public/_header" /}

    <!-- Sidebar -->
    {include file="public/_menu" /}
    <!-- End Sidebar -->

    <div class="main-panel">
        <div class="content">
            <div class="page-inner">
                <!-- 面包屑 -->
                {include file="public/_page_header" /}
                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-header">
                                <form class="row">
                                    <div class="col-md-6 col-lg-2">
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="pro_name" value="{$pro_name}" placeholder="请输入产品名称">
                                        </div>
                                    </div>
                                    <div class="col-md-6 col-lg-2">
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="cityname" value="{$cityname}" placeholder="请输入城市">
                                        </div>
                                    </div>
                                    <div class="col-md-6 col-lg-2">
                                        <div class="form-group">
                                            <input type="text" class="form-control" name="times" id="times" value="{$times}" placeholder="日期" autocomplete="off">
                                        </div>
                                    </div>
                                    <div class="col-md-6 col-lg-2">
                                        <div class="form-group">
                                            <select class="form-control input-full" name="orderb" id="orderb">
                                                <option value="0">排序</option>
                                                <option value="1" {if condition="$orderb eq 1"}selected{/if}>城市升序</option>
                                                <option value="2" {if condition="$orderb eq 2"}selected{/if}>总余额升序</option>
                                                <option value="3" {if condition="$orderb eq 3"}selected{/if}>总余额降序</option>
                                                <option value="4" {if condition="$orderb eq 4"}selected{/if}>当日需求量升序</option>
                                                <option value="5" {if condition="$orderb eq 5"}selected{/if}>当日需求量降序</option>
                                                <option value="6" {if condition="$orderb eq 6"}selected{/if}>当日满足量升序</option>
                                                <option value="7" {if condition="$orderb eq 7"}selected{/if}>当日满足量降序</option>
                                                <option value="8" {if condition="$orderb eq 8"}selected{/if}>当日满足率升序</option>
                                                <option value="9" {if condition="$orderb eq 9"}selected{/if}>当日满足率降序</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-md-6 col-lg-2">
                                        <div class="form-group">
                                            <button type="submit" class="btn btn-primary">查询</button>
                                            <a href="{:url('stat_push/record')}" class="btn btn-info" style="color: white;position: absolute;left: 110px;">重置</a>
                                        </div>
                                    </div>
                                </form>
                            </div>


                            <div class="layui-card-body">
                                <blockquote class="layui-elem-quote layui-quote-nm">
                                    <div class="table-responsive">
                                        <table id="add-row2" class="display table table-striped table-hover" >
                                            <thead>
                                            <tr>
                                                <th>产品</th>
                                                <th>规则数</th>
                                                <th>当日需求量</th>
                                                <th>当日满足量</th>
                                                <th>当日满足率</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            {volist name="calcs" id="calc"}
                                            <tr>
                                                <td>{$calc['name']}</td>
                                                <td>{$calc['sum_push_id']}</td>
                                                <td>{$calc['sum_up_limit']}</td>
                                                <td>{$calc['sum_push_num']}</td>
                                                <td>
                                                    <div class="layui-progress " lay-showPercent="yes">
                                                        <div class="layui-progress-bar layui-bg-red" lay-percent="{$calc['push_rate']}%"></div>
                                                    </div>
                                                    </td>

                                            </tr>
                                            {/volist}
                                            </tbody>
                                        </table>
                                    </div>
                                </blockquote>
                            </div>

                            <div class="card-body">
                                <div class="table-responsive">
                                    <table id="add-row" class="display table table-striped table-hover" >
                                        <thead>
                                        <tr>
                                            <th>日期</th>
                                            <th>投放产品</th>
                                            <th>投放城市</th>
                                            <th>规则数</th>
                                            <th>总余额</th>
                                            <th>当日需求量</th>
                                            <th>当日满足量</th>
                                            <th>当日满足率</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        {volist name="infos" id="vo"}
                                        <tr>
                                            <td>{$vo.create_date}</td>
                                            <td>{$vo.pro_name}</td>
                                            <td>{$vo.city}</td>
                                            <td>{$vo.sum_push_id}</td>
                                            <td {if condition="$vo.sum_balance <= 1000"}style="color: red;font-weight: bolder;"{/if}>{$vo.sum_balance}</td>
                                            <td>{$vo.sum_up_limit}</td>
                                            <td>{$vo.sum_push_num}</td>
                                            <td>
                                                <div class="layui-progress " lay-showPercent="yes">
                                                    <div class="layui-progress-bar layui-bg-red" lay-percent="{$vo.push_rate}%"></div>
                                                </div>
                                            </td>
                                        </tr>
                                        {/volist}
                                        </tbody>
                                    </table>
                                    <!-- 分页 (调取通用方法)-->
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {include file="public/_footer" /}
    </div>
</div>
{include file="public/_js" /}
<script src="__STATIC__/layui/layui.js"></script>
<script type="text/javascript">
    laydate.render({
        elem: '#times'
        ,type: 'date'
        ,range: true
    });

    layui.use('element', function(){
        var element = layui.element;
    });
</script>
</body>
</html>